package com.likersai.opon.pojo.bo;

import lombok.Data;

import java.io.Serializable;

/**
 * 分页请求
 *
 * @author LikerSai
 * @since 2024-04-28 00:26
 */
@Data
public class PageReq implements Serializable {
    
    private Integer page;
    private Integer size;
    
    public PageParam toPageParam(){
        PageParam param = new PageParam();
        param.setOffset(size);
        param.setRowStart((page - 1 )* size);
        return param;
    }
    
}